<html>
<head>
</head>

<style type = "text/css"> 
<!--
@import url("assets/css/table.css");')
@import url("assets/css/library.css");')
-->
body { background-color:#060; } 
body { background-color:#d2d2FF; } 

#containerlogin { margin: 1em auto 0 3em; background-color: #d2d2FF; } 
#containertop { margin: 1em auto 0 1em; padding-bottom: 1em; background-color: #ccfffe; } 
#container { margin: 0em auto 0 3em; padding-bottom: 3em; background-color: #fff; } 

.rtop { display:block; background:#060; } 
.rtop * { display: block; height: 1px; overflow: hidden; background:#fff; } 
.r1{margin: 0 0 0 5px}
.r2{margin: 0 0 0 3px} 
.r3{margin: 0 0 0 2px} 
.r4{margin: 0 0 0 1px; height: 2px} 

#container h1 { margin: 0 0 .5em .5em; font: 2em Arial, Helvetica, sans-serif; color: #060; } 

p {margin-top: 0; } 
.login {float:left; width:300px; margin-left:25px}  


#e50{
font-family: "Comic Sans MS", "Brush Script MT", cursive;
font-size:12 px;
background: #bbfeff;
border: none;
height : 25 px;
border-bottom: 1px solid black;
width : 50 px;


</style>
<body>

<title>Captain</title>

<div id=containerlogin>
 {{ LoginForm }} 
</div>


<center>
<h1> Court Reservations </h1>

{% if not LoggedIn %}
  Please Log in to edit your court reservations.  These are these available captain accounts.
<br><br>
<table>
<thead>
<tr>
<th scope="col"> Captain</th>
<th scope="col"> Username </th>
<th scope="col"> Team </th>

</thead>

{% for c in CaptainList %}
<tr>
<td>{{c.fname}}  {{c.lname}} </td>
<td>{{c.user}} </td>
<td>{{c.team}} </td>
</tr>
{% endfor %}


</table>



{% else %}

<p>
Back to  <a href="{{Host}}"> calendar </a> 
<p>
<center>
Pick a single court reservation and submit to delete the reservation.  <br>
Your reservation count is {{CaptainReservation.count}}.  <br>
Deleting the reservation will reduce your total count by 1.


</center>
<p>


<form name="reserve" action="{{Site}}" method="POST">

<table>
Captain {{ CaptainReservation.fname }} {{ CaptainReservation.lname }} {{ CaptainReservation.team }} 
<thead>
<tr>
<th scope="col">Select</th>
<th scope="col">Day</th>
<th scope="col">Date</th>
<th scope="col">Courts</th>
<th scope="col">Location</th>
<th scope="col">Time</th>
<th scope="col">Description</th>
</thead>

{% for e in CaptainReservation.courts %}
<tr>
<td>
 <input type="radio" name="keyname" value="{{e.key}}"> <br>  </input>
</td>
<td>{{e.weekday}} </td>
<td>{{e.date}} </td>
<td>{{e.courts}} </td>
<td>{{e.location}} </td>
<td>{{e.start}} -> {{e.end}} </td>
<td>{{e.desc}}</td>
</tr>
{% endfor %}

</table>

<input type="submit" value="Delete a Court Reservation" />
</form>

{% endif  %}

{% if LoggedIn %}

<p>
<h2>Change Password</h2>
<table width="470" border="0">
<tr>
<td style="background-color: #d2d2ff;">
You may select a new password for your account.
Do not use the same password as one of your own user/email accounts, 
as passwords are stored into the database with no encryption,  
and the Administrator will know your password. 
Select something simple and easy to remember yet sufficient to protect your account from others.

Passwords are limited to 7 characters.
</td>
</tr>
</table>

<form name="password" action="pwchange" method="POST">
<table>
<tr> 
<td>Password</td>
<td><input type="password" name="pw1" value="" size="7" maxLength="7"></td>

</tr>

<tr>
<td>Password Confirm</td>
<td><input type="password" name="pw2" value="" size="7" maxLength="7"></td>
</tr>

<table>

<input type="submit" value="Password Change" />
</form>

{% endif  %}
